const mongoose = require("mongoose");
//店铺信息数据库
const schema = new mongoose.Schema(
  {
    name: { type: String },
    address: { type: String },
    avatar: { type: String },
    age: { type: String },
    // 绑定用户
    userId: { type: mongoose.SchemaTypes.ObjectId, ref: "User" },
    
    scores: {
      serviceAttitude: { type: Number },
      descriptionMatch: { type: Number },
      credibility: { type: Number },
    },
  },
  {
    timestamps: true,
  }
);

module.exports = mongoose.model("Shop", schema);
